package com.fzx.fzwsupplysystem;

import android.app.Application;
import android.util.Log;

import com.Interface.onFacecompareAutnResult;
import com.common.Facecompare;
import com.fzx.fzwsupplysystem.util.LogUtil;
import com.lzy.okgo.OkGo;
import com.lzy.okgo.cache.CacheMode;

import java.util.concurrent.TimeUnit;

import okhttp3.OkHttpClient;

/**
 * 项目名称：com.fzx.fzwsupplysystem
 * 描述：
 * 作者：FangZhiXin
 * 日期：2019/10/17 12:37
 */
public class MyApplication extends Application {

    private static final String TAG = "MyApplication";
    public static boolean isDebug = BuildConfig.IS_DEBUG;

    public static boolean isInitFace() {
        return isInitFace;
    }

    public static void setInitFace(boolean initFace) {
        isInitFace = initFace;
    }

    private static boolean isInitFace;

    public static String getMatchChNm() {
        return matchChNm;
    }

    public static void setMatchChNm(String matchChNm) {
        MyApplication.matchChNm = matchChNm;
    }

    public static String getMatchEnNm() {
        return matchEnNm;
    }

    public static void setMatchEnNm(String matchEnNm) {
        MyApplication.matchEnNm = matchEnNm;
    }

    public static String getMatchID() {
        return matchID;
    }

    public static void setMatchID(String matchID) {
        MyApplication.matchID = matchID;
    }

    private static String matchChNm;
    private static String matchEnNm;
    private static String matchID;

    @Override
    public void onCreate() {
        super.onCreate();
        //简单初始化
        OkGo.getInstance().init(this);
        /*OkHttpClient.Builder builder = new OkHttpClient.Builder();

        //全局的读取超时时间
        builder.readTimeout(OkGo.DEFAULT_MILLISECONDS, TimeUnit.MILLISECONDS);
        //全局的写入超时时间
        builder.writeTimeout(OkGo.DEFAULT_MILLISECONDS, TimeUnit.MILLISECONDS);
        //全局的连接超时时间
        builder.connectTimeout(OkGo.DEFAULT_MILLISECONDS, TimeUnit.MILLISECONDS);

        OkGo.getInstance().init(this)                       //必须调用初始化
                .setOkHttpClient(builder.build())           //建议设置OkHttpClient，不设置将使用默认的
                .setRetryCount(3);*/
        LogUtil.init(getApplicationContext(), true, 10);
    }

}
